#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>

typedef int HeapData;
typedef struct Heap
{
	HeapData* arr;
	int size;
	int capacity;
}HP;

void HPInit(HP* php);
void HPDestroy(HP* php);
void HPPrint(HP* php);
void Swap(int* x, int* y);
void AdjustUp(HeapData* arr, int child);
void AdjustDown(HeapData* arr, int parent, int n);
void HPPush(HP* php, HeapData x);
void HPPop(HP* php);
bool HPEmpty(HP* php);
HeapData HPTop(HP* php);